#!/bin/bash

# LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved.
# SPDX-License-Identifier: BSD-2-Clause
# See additional acknowledgments in the LICENSE file,
# or contact permission@sei.cmu.edu for the full terms.

# do_gap_sssp: run the GAP benchmarks for Single-Source Shortest-Path

# Usage:
#
#   To run using *.mtx format, with the files in ../../../GAP:
#
#       ./do_gap_sssp > myoutput.txt
#
#   To run using binary *.grb format, with the files in ../../../GAP:
#
#       ./do_gap_sssp grb > myoutput.txt
#
#   To run using binary *.mtx format, with the files in /my/stuff/GAP
#
#       ./do_gap_sssp mtx /my/stuff/GAP > myoutput.txt
#
#   To run using binary *.mtx format, with the files in /my/stuff/GAP
#
#       ./do_gap_sssp grb /my/stuff/GAP > myoutput.txt

echo " "
echo "======================================================================"
echo "GAP benchmarks using LAGraph+GraphBLAS: Single-Source Shortest Path"
echo "======================================================================"

if [ -z "$1" ]; then KIND="mtx" ; else KIND=$1 ; fi
echo "Matrix input file format: " $KIND

if [ -z "$2" ]; then GAP="../../../GAP" ; else GAP=$2 ; fi
echo "GAP matrices located in:  " $GAP

../../build/src/benchmark/sssp_demo $GAP/GAP-kron/GAP-kron.$KIND       $GAP/GAP-kron/GAP-kron_sources.mtx         29     
../../build/src/benchmark/sssp_demo $GAP/GAP-urand/GAP-urand.$KIND     $GAP/GAP-urand/GAP-urand_sources.mtx       41      
../../build/src/benchmark/sssp_demo $GAP/GAP-twitter/GAP-twitter.$KIND $GAP/GAP-twitter/GAP-twitter_sources.mtx   51     
../../build/src/benchmark/sssp_demo $GAP/GAP-web/GAP-web.$KIND         $GAP/GAP-web/GAP-web_sources.mtx           140    
../../build/src/benchmark/sssp_demo $GAP/GAP-road/GAP-road.$KIND       $GAP/GAP-road/GAP-road_sources.mtx         50000 

